package com.smartbone.dao.daoInterface;
import java.util.List;

import com.smartbone.entity.Band;

/**
 * Interface for BandDAO.
 * 
 * @author MyEclipse Persistence Tools
 */

public interface IBandDAO {
	/**
	 * Perform an initial save of a previously unsaved Band entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#persist(Object)
	 * EntityManager#persist} operation.
	 * <p>
	 * User-managed Spring transaction example:
	 * 
	 * <pre>
	 * TransactionStatus txn = txManager
	 * 		.getTransaction(new DefaultTransactionDefinition());
	 * IBandDAO.save(entity);
	 * txManager.commit(txn);
	 * </pre>
	 * 
	 * @see <a href =
	 *      "http://www.myeclipseide.com/documentation/quickstarts/jpaspring#containermanaged">Spring
	 *      container-managed transaction examples</a>
	 * @param entity
	 *            Band entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(Band entity);

	/**
	 * Delete a persistent Band entity. This operation must be performed within
	 * the a database transaction context for the entity's data to be
	 * permanently deleted from the persistence store, i.e., database. This
	 * method uses the {@link javax.persistence.EntityManager#remove(Object)
	 * EntityManager#delete} operation.
	 * <p>
	 * User-managed Spring transaction example:
	 * 
	 * <pre>
	 * TransactionStatus txn = txManager
	 * 		.getTransaction(new DefaultTransactionDefinition());
	 * IBandDAO.delete(entity);
	 * txManager.commit(txn);
	 * entity = null;
	 * </pre>
	 * 
	 * @see <a href =
	 *      "http://www.myeclipseide.com/documentation/quickstarts/jpaspring#containermanaged">Spring
	 *      container-managed transaction examples</a>
	 * @param entity
	 *            Band entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(Band entity);

	/**
	 * Persist a previously saved Band entity and return it or a copy of it to
	 * the sender. A copy of the Band entity parameter is returned when the JPA
	 * persistence mechanism has not previously been tracking the updated
	 * entity. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
	 * operation.
	 * <p>
	 * User-managed Spring transaction example:
	 * 
	 * <pre>
	 * TransactionStatus txn = txManager
	 * 		.getTransaction(new DefaultTransactionDefinition());
	 * entity = IBandDAO.update(entity);
	 * txManager.commit(txn);
	 * </pre>
	 * 
	 * @see <a href =
	 *      "http://www.myeclipseide.com/documentation/quickstarts/jpaspring#containermanaged">Spring
	 *      container-managed transaction examples</a>
	 * @param entity
	 *            Band entity to update
	 * @return Band the persisted Band entity instance, may not be the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public Band update(Band entity);

	public Band findById(Long id);

	/**
	 * Find all Band entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the Band property to query
	 * @param value
	 *            the property value to match
	 * @return List<Band> found by query
	 */
	public List<Band> findByProperty(String propertyName, Object value);

	public List<Band> findByStartPrice(Object startPrice);

	public List<Band> findByEndPrice(Object endPrice);

	public List<Band> findByDateNum(Object dateNum);

	public List<Band> findByBandPer(Object bandPer);

	public List<Band> findByTjPrice(Object tjPrice);

	public List<Band> findByNowPrice(Object nowPrice);

	public List<Band> findByPriceDif(Object priceDif);

	public List<Band> findByTjAmount(Object tjAmount);

	public List<Band> findByNowAmount(Object nowAmount);

	public List<Band> findByAmountDif(Object amountDif);

	/**
	 * Find all Band entities.
	 * 
	 * @return List<Band> all Band entities
	 */
	public List<Band> findAll();
}